package com.liang.e;

import java.util.ArrayList;

public class Text {
    public static void main(String[] args) {
       /* ArrayList<String> str = new ArrayList<>();
        str.add("adb");
        ArrayList<Integer> inte = new ArrayList<>();
        inte.add(1);
*/
        /*method1(new ArrayList<A>());
        method1(new ArrayList<B>());
        method1(new ArrayList<C>());
        method1(new ArrayList<D>());*/

        /*method2(new ArrayList<A>());
        method2(new ArrayList<B>());
        method2(new ArrayList<C>());
        method2(new ArrayList<D>());*/
    }

    public static void method1(ArrayList<? extends C> c) {
        System.out.println(c);
    }

    public static void method2(ArrayList<? super C> c) {

        System.out.println(c);
    }


}

class A{}
class B extends A{}
class C extends B{}
class D extends C{}